<%--
    Document   : ticketdetails
    Created on : Nov 29, 2009, 10:53:26 PM
    Author     : brian
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.ArrayList,helpdesk.User,helpdesk.LoginCheck,helpdesk.MapsFormat"%>

<%! // declarations go in this kind of tag
    String error;
    User userInfo;
 %>

 <% // embedded java code goes in this kind of tag
    error = (String)request.getAttribute("error");
    if (error == null)
        error = "";

    userInfo = (User)request.getAttribute("user");
 %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="headtags.html"%>
        <title>Profile Information</title>
    </head>
    <body>
        <%@include file="menu.html"%>

        <%-- The tag below places the output of the java expression on the page --%>
        <%= error %>
        <% if (userInfo != null) { %>
        <table class="content" width ="100%"><tr class="heading"><td align="center">Ticket Details</td></tr><tr><td>
        <table class="profile">
            <tr>
                <td class="profile">Name</td>
                <td class="profile"><%= userInfo.getFirstName() + userInfo.getLastName() + (LoginCheck.isLoggedIn(userInfo.getId())?" (online)":"") %></td>
            </tr>
            <tr>
                <td class="profile">Email</td>
                <td class="profile"><%= userInfo.getEmail() %></td>
            </tr>
            <tr>
                <td class="profile">Address</td>
                <td class="profile"><a href="http://maps.google.com?q=<%=MapsFormat.format(userInfo)%>" target="new"> <%= userInfo.getAddress() + "," + userInfo.getZip()%></a></td>
            </tr>
        </table>
        </td></tr></table>
            <% } %>
    </body>
</html>
